package com.chookss.video.recommend;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import com.chookss.base.X5WebView;
import com.chookss.view.consecutivescroller.IConsecutiveScroller;

import java.util.ArrayList;
import java.util.List;

public class MyWebView extends X5WebView implements IConsecutiveScroller {
    public MyWebView(Context arg0, AttributeSet arg1) {
        super(arg0, arg1);
    }

    @Override
    public View getCurrentScrollerView() {
        return getView();
    }

    @Override
    public List<View> getScrolledViews() {
        List<View> views = new ArrayList<>();
        views.add(getView());
        return views;
    }

    @Override
    public void scrollBy(int x, int y) {
        // 把滑动交给它的子view
        getView().scrollBy(x, y);
    }
}
